<!---------头部------------->
<div id="Header">
    <div id="Logo">
        <a href="javascript:void(0)"><img src="images/un_logo.gif"></a>
    </div>
    <div id="Toolbar">
        <span id="ClientName"><?php echo $this->session->userdata('username'); ?>（<?php echo $this->session->userdata('role'); ?>）</span> | <?= anchor('login/quit/','安全退出') ?>
    </div>
</div>
<!---------导航------------->
<div id="Nav">
    <ul>
        <li <?php if($class): ?> class=" <?= $class?> " <?php endif;?>><?=anchor('console/index/','控制台')?></li>
        <li <?php if($class1): ?> class=" <?= $class1?> " <?php endif;?>><?=anchor('customer/index/','客户')?></li>
        <li <?php if($class2): ?> class=" <?= $class2?> " <?php endif;?>><?=anchor('contacter/index/','联系人')?></li>
        <?php
         $user_role = $this->session->userdata('role');
        ?>
        <?php if ($user_role != '商务助理'):?>
        	<li <?php if($class3): ?> class=" <?= $class3?> " <?php endif;?>> <?=anchor('opportunity/index/','销售机会')?></li>
        <?php endif;?>

        <li id="level_one" <?php if($class4): ?> class=" <?= $class4?> " <?php endif;?>>
			<?=anchor('contract/index/','合同/订单')?>
        	<div class="level_two">
            	<ul>
                	<li><a href="<?=base_url()?>index.php/contract">合同列表</a></li>
                	<?php if ($user_role != '商务助理'):?>
                	<li><?= anchor('payment_plan/index/','回款计划')?></li>
                    <li><?= anchor('payment_record/index/','回款记录')?></li>
                    <?php endif;?>
                </ul>
            </div>
        </li>
        <li <?php if($class9): ?> class=" <?= $class9?> " <?php endif;?>> <?=anchor('outside_contract/index/','外签合同')?></li>
        <li <?php if($class11): ?> class=" <?= $class11?> " <?php endif;?>><?=anchor('suppliers/index/','供应商')?></li>
        <li <?php if($class5): ?> class=" <?= $class5?> " <?php endif;?>><?=anchor('schedule/display/','日程/任务')?></li>
        <!-- <li><a href="7.html">常用工具</a></li> -->
        <?php if($this->session->userdata('role') == '经理'):?>
        <li <?php if($class6): ?> class=" <?= $class6?> " <?php endif;?>><?= anchor('user/index/','用户')?></li>
        <li <?php if($class7): ?> class=" <?= $class7?> " <?php endif;?>><?= anchor('area/index/','区域')?></li>
        <?php endif;?>
        <li <?php if($class10): ?> class=" <?= $class10?>" <?php endif;?>><a href="application/views/personal_information_edit.php" class="various1">密码修改</a></li>
    </ul
></div>
<script type="text/javascript">

	$(document).ready(function(){
		$("#level_one").hover(
			function(){
				$(".level_two").slideDown();
			},
			function(){
				$(".level_two").slideUp("fast");
			}
		);

		$(".level_two").hover(
			function(){
				if(!$("#level_one").hasClass("cur")) {
					$("#level_one > a").addClass("a_bg");
				}
			},
			function(){
				$("#level_one a").removeClass("a_bg");
			}
		);
	});
</script>
